def current_time
  time = Time.new
  time.strftime("%Y-%m-%d %H:%M:%S")
end

def bayesian_average(this_rating, this_num_votes)
  c = 2
  avg_rating = 2
  ((c*avg_rating)+(this_num_votes*this_rating))/(c+this_num_votes)
end

def valid_email(email)
  if email =~ /\A[\w\._%-]+@[\w\.-]+\.[a-zA-Z]{2,4}\z/
    return true
  else
    return false
  end
end

PHOTO_PATH = "lib/uploads"
DATA_PATH = "lib/data"